/**
 * 
 */
package com.yidu.view;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.yidu.bean.TbOrder;
import com.yidu.bean.TbOrderCare;
import com.yidu.message.Message;
import com.yidu.service.TbOrderCareService;
import com.yidu.service.TbOrderService;

/**
 * 类的描述 -- 类
 * @author LiuZongNan
 * 2018年7月26日
 */
@Controller
@RequestMapping("/orderCare")
public class TbOrderCareAction {
	//控制台打印
	Logger logger = Logger.getLogger(TbSiteAction.class);
	
	//消息信息类
	Message msg = new Message();

	//json
	ObjectMapper mapper = new ObjectMapper();
	@Resource
	private TbOrderCareService orderCareService;
	@Resource
	private TbOrderService orderServiceImpl;
	@RequestMapping("/findById")
	@ResponseBody
	public List<TbOrderCare> findById(String orderId){
		//String orderId = (String) session.getAttribute("orderId");
		logger.info("findById:根据用户id查询订单的方法");
		System.out.println(orderId+"小豆子+++++++++++++++");
		List<TbOrderCare> orders = orderCareService.findById(orderId);
		return orders;
	}
}
